package lab02.test15;

/**
 * Created by 婷婷 on 2017/10/20.
 */
public class Test15 {
    public static void main(String[] args) {

        //创建一个新的对象为zahngsan
        Graduate zhangsan = new Graduate();

        //对zahngsan的工资和学费传值
        zhangsan.setPay( 10000.0);
        zhangsan.setFee(1200.0);

        //运用if条件判断是否需要贷款
        if(zhangsan.getPay()-zhangsan.getFee()<2000){
            System.out.println("“You  need a loan!");
        }else{
            System.out.println("You income is enough！");
        }
    }
}
